<template>
  <div class="flex items-start row">
    <div class="shop-wrapper" v-for="(item, index) in menuCommingSoon" :key="index">
      <div class="icon" :style="{'background': item.bgColor }">
        <q-icon v-if="item.isSvg" class="font" :name="item.icon" />
        <q-icon v-else class="font" :name="`iconfont ${item.icon}`" :style="{'color': item.iconColor }"></q-icon>
      </div>
      <div class="content-wrapper">
        <div>
          <div class="title">{{item.title}}</div>
          <div class="content">
            {{ item.desc }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { menuData } from '../../shop/data'

export default {
  name: 'ComingSoon',
  computed: {
    menuCommingSoon () {
      return this.menuData.filter(item => item.privilegeId === undefined)
    }
  },
  data () {
    return {
      menuData: menuData
    }
  }
}
</script>

<style scoped lang="scss">
.shop-wrapper {
  width: 310px;
  height: 150px;
  background: #FFFFFF;
  box-shadow: 0px 0px 6px 0px rgba(6, 0, 1, 0.1);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  margin-right: 20px;
  margin-bottom: 20px;

  .used{
    width: 80px;
    height: 30px;
    background: #5F77FD;
    border-radius: 0px 6px 0px 30px;
    position: absolute;
    right: 0;
    top: 0;
    text-align: center;
    color: #ffffff;
    line-height: 30px;
  }

  .icon{
    width: 48px;
    height: 48px;
    background: rgba(205, 213, 255, 0.3);
    border-radius: 20px;
    text-align: center;
    line-height: 48px;
    position: absolute;
    left: 20px;
    top: 20px;

    .font{
      font-size: 20px;
      color: rgba(95, 119, 253, 1);
    }
  }

  .content-wrapper{
    position: absolute;
    left: 83px;
    padding-top: 30px;
    padding-right: 30px;
    padding-bottom: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .title {
      font-size: 18px;
      font-weight: bold;
      color: #333333;
    }

    .content {
      font-weight: 400;
      color: #666666;
      padding: 10px 0 20px 0;
      font-size: 12px;
    }

    .more {
      font-weight: 500;
      color: #999999;
      cursor: pointer;
    }
  }
}
</style>
